/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #ecf0f1;
    --surface: rgba(255, 255, 255, 0.95);
    --surface-hover: rgba(255, 255, 255, 0.98);
    --shadow-light: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 15px 60px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 20px 80px rgba(0, 0, 0, 0.2);
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--primary-gradient);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* 背景动效 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: float 20s infinite linear;
}

.orb-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: -5s;
}

.orb-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: -10s;
}

.orb-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 70%;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotateZ(0deg); }
    25% { transform: translateY(-30px) rotateZ(90deg); }
    50% { transform: translateY(30px) rotateZ(180deg); }
    75% { transform: translateY(-20px) rotateZ(270deg); }
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 4rem;
    background: var(--surface);
    padding: 3rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo i {
    font-size: 3rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* 输入区域 */
.input-section {
    margin-bottom: 3rem;
}

.input-container {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.input-wrapper {
    flex: 1;
    position: relative;
    min-width: 300px;
}

.input-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.url-input {
    width: 100%;
    padding: 1.5rem 1.5rem 1.5rem 4rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-sm);
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    font-family: inherit;
}

.url-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.fetch-button {
    position: relative;
    padding: 1.5rem 2.5rem;
    background: var(--secondary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    min-width: 180px;
    font-family: inherit;
}

.fetch-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.fetch-button:active {
    transform: translateY(-1px);
}

.fetch-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.button-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.button-ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: inherit;
    transform: scale(0);
    transition: transform 0.6s ease;
}

.fetch-button:active .button-ripple {
    transform: scale(1);
}

/* 结果区域 */
.result-section {
    min-height: 200px;
}

/* Loading动效 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: var(--surface);
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.news-wave {
    display: flex;
    gap: 8px;
    margin-bottom: 2rem;
}

.wave-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-gradient);
    animation: wave 1.4s infinite ease-in-out;
}

.wave-dot:nth-child(1) { animation-delay: -0.32s; }
.wave-dot:nth-child(2) { animation-delay: -0.16s; }
.wave-dot:nth-child(3) { animation-delay: 0s; }
.wave-dot:nth-child(4) { animation-delay: 0.16s; }
.wave-dot:nth-child(5) { animation-delay: 0.32s; }

@keyframes wave {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1.2); opacity: 1; }
}

.loading-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-align: center;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    animation: progress 2s infinite;
    border-radius: 2px;
}

@keyframes progress {
    0% { width: 0%; margin-left: 0%; }
    50% { width: 75%; margin-left: 5%; }
    100% { width: 0%; margin-left: 100%; }
}

/* 新闻内容 */
.news-content {
    background: var(--surface);
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.news-header {
    padding: 2rem;
    background: var(--dark-gradient);
    color: var(--text-light);
    position: relative;
}

.news-header i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #4facfe;
}

.news-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.news-meta {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.news-body {
    padding: 2rem;
}

.news-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    position: relative;
}

.news-text::after {
    content: '|';
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.news-footer {
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.usage-info {
    display: flex;
    gap: 2rem;
}

.usage-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.usage-item i {
    color: #4facfe;
}

.retry-button {
    padding: 0.8rem 1.5rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.retry-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

/* 错误提示 */
.error-message {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(255, 0, 0, 0.1);
    backdrop-filter: blur(20px);
}

.error-message i {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.error-message p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* 底部 */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 震动动效 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .input-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .input-wrapper {
        min-width: auto;
    }
    
    .fetch-button {
        min-width: auto;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .news-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .usage-info {
        justify-content: center;
    }
} 